package com.huawei.controller;

import com.huawei.entity.SysUserEntity;
import com.huawei.util.R;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/user")
public class SysUserController {


    /**
     * 获取登录的用户信息
     */
    @ApiOperation(value="获取用户列表", notes="获取用户列表")
    @RequestMapping("/info")
    public R info(){
        return R.ok().put("user", SecurityUtils.getSubject().getPrincipal());
    }

}
